<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>test</title>
    <style>
        body {
            background-color: #ccc;
        }
        #opation {
            width: 500px;
            height: 300px;
        }
        #pubForm [type="text"]{
            border: 1px solid #dcdfe6;
            border-radius: 6px;
            outline: none;
        }
        .pubBtn {
            background-color: #429788;
            border: none;
            border-radius: 5px;
            color: #fff;
        }
    </style>
</head>
<body>
    <div id="opation"></div>
    <form id="pubForm" >
        <input type="text" name="text" list="list_text">
        <datalist id="list_text">
            <option>aaa</option>
            <option>bbb</option>
            <option>ccc</option>
        </datalist>
        <input type="button" name="" id="btn" class="pubBtn" value="点击">
    </form>
    <ul>
        <li><option value="啊啊啊啊啊">aaaa</option></li>
        <li><option value="嘎嘎嘎嘎嘎">aaaa</option></li>
    </ul>
</body>
<script src="js/jquery-3.4.1.js"></script>
<script type="text/javascript" src="http://echarts.baidu.com/gallery/vendors/echarts/echarts-all-3.js"></script>
<script>
    $("li option").click(function() {
        console.log($(this).val());
    });
       option = {
    title: {
        text: '一天用电量分布',
        subtext: '纯属虚构'
    },
    tooltip: {
        trigger: 'axis',
        axisPointer: {
            type: 'cross'
        }
    },
    toolbox: {
        show: true,
        feature: {
            saveAsImage: {}
        }
    },
    xAxis:  {
        type: 'category',
        boundaryGap: false,
        data: ['00:00', '01:15', '02:30', '03:45', '05:00', '06:15', '07:30', '08:45', '10:00', '11:15', '12:30', '13:45', '15:00', '16:15', '17:30', '18:45', '20:00', '21:15', '22:30', '23:45']
    },
    yAxis: {
        type: 'value',
        axisLabel: {
            formatter: '{value} W'
        },
        axisPointer: {
            snap: true
        }
    },
    visualMap: {
        show: false,
        dimension: 0,
        pieces: [{
            lte: 6,
            color: 'green'
        }, {
            gt: 6,
            lte: 8,
            color: 'red'
        }, {
            gt: 8,
            lte: 14,
            color: 'green'
        }, {
            gt: 14,
            lte: 17,
            color: 'red'
        }, {
            gt: 17,
            color: 'green'
        }]
    },
    series: [
        {
            name:'用电量',
            type:'line',
            smooth: true,
            data: [300, 280, 250, 260, 270, 300, 550, 500, 400, 390, 380, 390, 400, 500, 600, 750, 800, 700, 600, 400],
            markArea: {
                data: [ [{
                    name: '早高峰',
                    xAxis: '07:30'
                }, {
                    xAxis: '10:00'
                }], [{
                    name: '晚高峰',
                    xAxis: '17:30'
                }, {
                    xAxis: '21:15'
                }] ]
            }
        }
    ]
};

        var myChart = echarts.init(document.getElementById('opation'));
		myChart.setOption(option);
</script>
</html>